package Noname;

/**
 * @Author Stringzhua
 * @Date 2024/3/7 19:57
 * description:
 */
public class Test {
    //    public static void main(String[] args) {
//        //实现类
//        MyImplements myImplements = new MyImplements();
//        myImplements.test();
//        //匿名内部类
//        MyInterface myInterface=new MyInterface() {
//            @Override
//            public void test() {
//                System.out.println("test");
//            }
//        };
//        myInterface.test();
//    }
    public class MyImplement implements MyInterface {

        @Override
        public void test() {
            System.out.println("test");
        }
    }
    public static void main(String[] args) {
        Test test = new Test();
        MyInterface myInterface = test.new MyImplement();
        myInterface.test();
    }
}
